﻿using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Crm.Manager.Common
{
    public class DBLog
    {
        readonly static Logger processLogger = LogManager.GetLogger("LnProcessDBLog2");

        /// <summary>
        /// 错误日志
        /// </summary>
        /// <param name="content"></param>
        public static void Error(string content)
        {

            LogEventInfo theEvent = new LogEventInfo(LogLevel.Error, "", content);
            theEvent.Properties["shortPath"] = AppDomain.CurrentDomain.BaseDirectory + "/logs";
            processLogger.Error(theEvent);
        }

        public static void Flush()
        {
            LogManager.Flush();
        }
    }
}
